﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
                    
                    xmlns:info="http://schemas.xword.com/winfx/xaml/info"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Style TargetType="{x:Type info:ElementListBoxItem}">
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type info:ElementListBoxItem}">
                    <Border x:Name="OuterBorder" Margin="2,0,2,0" BorderThickness="1" CornerRadius="3" BorderBrush="Transparent" Background="Transparent">
                        <Border x:Name="InnerBorder" BorderThickness="1" CornerRadius="2" BorderBrush="Transparent" Background="Transparent">
                            <ContentPresenter x:Name="Content" Margin="2,0,2,0" />
                        </Border>
                    </Border>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="OuterBorder" Property="BorderThickness" Value="0" />
                            <Setter TargetName="InnerBorder" Property="BorderThickness" Value="0" />
                            <Setter TargetName="Content" Property="Margin" Value="0" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="OuterBorder" Property="BorderBrush" Value="{DynamicResource {x:Static themes:RibbonCommonDictionary.RibbonControlOuterBorderHoverBrushKey}}" />
                            <Setter TargetName="OuterBorder" Property="Background" Value="{DynamicResource {x:Static themes:RibbonCommonDictionary.RibbonControlLargeBackgroundHoverBrushKey}}" />
                            <Setter TargetName="InnerBorder" Property="BorderBrush" Value="{DynamicResource {x:Static themes:RibbonCommonDictionary.RibbonControlInnerBorderHoverBrushKey}}" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="True" />
                                <Condition Property="IsMouseOver" Value="False" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="OuterBorder" Property="BorderBrush" Value="{DynamicResource {x:Static themes:RibbonCommonDictionary.RibbonControlOuterBorderSelectedBrushKey}}" />
                            <Setter TargetName="OuterBorder" Property="Background" Value="{DynamicResource {x:Static themes:RibbonCommonDictionary.RibbonControlLargeBackgroundSelectedBrushKey}}" />
                            <Setter TargetName="InnerBorder" Property="BorderBrush" Value="{DynamicResource {x:Static themes:RibbonCommonDictionary.RibbonControlInnerBorderSelectedBrushKey}}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="True" />
                                <Condition Property="IsMouseOver" Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="OuterBorder" Property="BorderBrush" Value="{DynamicResource {x:Static themes:RibbonCommonDictionary.RibbonControlOuterBorderHoverSelectedBrushKey}}" />
                            <Setter TargetName="OuterBorder" Property="Background" Value="{DynamicResource {x:Static themes:RibbonCommonDictionary.RibbonControlLargeBackgroundHoverSelectedBrushKey}}" />
                            <Setter TargetName="InnerBorder" Property="BorderBrush" Value="{DynamicResource {x:Static themes:RibbonCommonDictionary.RibbonControlInnerBorderHoverSelectedBrushKey}}" />
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--x:Key="RibbonListBoxItem"-->
    <Style TargetType="ListBoxItem">
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBoxItem">
                    <Border x:Name="OuterBorder" Margin="2,0,2,0" BorderThickness="1" CornerRadius="3" BorderBrush="Transparent" Background="Transparent">
                        <Border x:Name="InnerBorder" BorderThickness="1" CornerRadius="2" BorderBrush="Transparent" Background="Transparent">
                            <ContentPresenter x:Name="Content" Margin="2,0,2,0" />
                        </Border>
                    </Border>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="OuterBorder" Property="BorderThickness" Value="0" />
                            <Setter TargetName="InnerBorder" Property="BorderThickness" Value="0" />
                            <Setter TargetName="Content" Property="Margin" Value="0" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="OuterBorder" Property="BorderBrush" Value="{DynamicResource {x:Static themes:RibbonCommonDictionary.RibbonControlOuterBorderHoverBrushKey}}" />
                            <Setter TargetName="OuterBorder" Property="Background" Value="{DynamicResource {x:Static themes:RibbonCommonDictionary.RibbonControlLargeBackgroundHoverBrushKey}}" />
                            <Setter TargetName="InnerBorder" Property="BorderBrush" Value="{DynamicResource {x:Static themes:RibbonCommonDictionary.RibbonControlInnerBorderHoverBrushKey}}" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="True" />
                                <Condition Property="IsMouseOver" Value="False" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="OuterBorder" Property="BorderBrush" Value="{DynamicResource {x:Static themes:RibbonCommonDictionary.RibbonControlOuterBorderSelectedBrushKey}}" />
                            <Setter TargetName="OuterBorder" Property="Background" Value="{DynamicResource {x:Static themes:RibbonCommonDictionary.RibbonControlLargeBackgroundSelectedBrushKey}}" />
                            <Setter TargetName="InnerBorder" Property="BorderBrush" Value="{DynamicResource {x:Static themes:RibbonCommonDictionary.RibbonControlInnerBorderSelectedBrushKey}}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="True" />
                                <Condition Property="IsMouseOver" Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="OuterBorder" Property="BorderBrush" Value="{DynamicResource {x:Static themes:RibbonCommonDictionary.RibbonControlOuterBorderHoverSelectedBrushKey}}" />
                            <Setter TargetName="OuterBorder" Property="Background" Value="{DynamicResource {x:Static themes:RibbonCommonDictionary.RibbonControlLargeBackgroundHoverSelectedBrushKey}}" />
                            <Setter TargetName="InnerBorder" Property="BorderBrush" Value="{DynamicResource {x:Static themes:RibbonCommonDictionary.RibbonControlInnerBorderHoverSelectedBrushKey}}" />
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
